<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        input[type="text"] {
            -webkit-appearance: none;
            width: 230px;
            height: 22px;
            border-radius: 4px;
            background-color: rgba(255, 255, 255, 1);
            border: 1px solid rgba(223, 223, 223, 1);
        }

        input[type="text"]:focus {
            background-color: rgba(255, 255, 255, 1);
            border: 1px solid rgba(18, 177, 255, 1);
        }

        label {
            position: relative;
            cursor: pointer;
        }

        p {
            display: inline-block;
        }

        input[type="radio"],
        label input[type="checkbox"] {
            display: none;
        }

        span {
            padding-left: 25px;
        }

        .radioSpan:before {
            content: "";
            width: 16px;
            height: 16px;
            border: 1px solid #333333;
            border-radius: 50%;
            position: absolute;
            top: 2px;
            left: 4px;
        }

        .checkboxSpan:before {
            content: "";
            width: 16px;
            height: 16px;
            border: 1px solid #333333;
            position: absolute;
            top: 2px;
            left: 4px;
        }

        input[type="radio"]:checked + span::before,
        input[type="radio"]:hover + span::before,
        input[type="checkbox"]:hover + span::before {
            border: 1px solid #0AA9F7;
        }

        input[type="radio"]:hover + span::before,
        input[type="checkbox"]:hover + span::before {
            background-color: rgba(220, 243, 255, 1);
        }

        input[type="radio"]:checked + span::after {
            content: "";
            width: 10px;
            height: 10px;
            background-color: #0AA9F7;
            border-radius: 50%;
            position: absolute;
            top: 6px;
            left: 8px;
        }

        input[type="checkbox"]:checked + span::before {
            border: 1px solid #0AA9F7;
        }

        input[type="checkbox"]:checked + span::after {
            content: "";
            width: 4px;
            height: 9px;
            border-color: #0AA9F7;
            border-style: solid;
            border-width: 0 2px 2px 0;
            position: absolute;
            transform: rotate(45deg);
            top: 4px;
            left: 10px;
        }

        input[type="radio"]:checked + span,
        input[type="checkbox"]:checked + span {
            color: #337ab7;
            font-weight: bold;
        }

        .check {
            position: relative;
            top: 6px;
            -webkit-appearance: none;
            width: 40px;
            height: 20px;
            line-height: 20px;
            border-radius: 15px;
            outline: none;
            background-color: rgba(224, 224, 224, 1);
            border: 1px solid rgba(224, 224, 224, 1);
        }

        .check:before {
            position: absolute;
            left: 0;
            content: "";
            width: 19px;
            height: 19px;
            border-radius: 50%;
            transition: all 0.2s linear;
            background-color: rgba(255, 255, 255, 1);
            box-shadow: 0px 1px 4px 0px rgba(1, 1, 1, 0.26);
        }

        .check:checked {
            background: #52C41A 100%;
        }

        .check:checked:before {
            left: 20px;
            transition: all 0.2s linear;
        }
    </style>
</head>
<body>
<form action="">
    <p>姓名：</p><input type="text">
    <br>
    <p>性别：</p>
    <label><input type="radio" checked="checked" value="1" name="fruit"> <span class="radioSpan">男</span></label>
    <label><input type="radio" value="2" name="fruit"> <span class="radioSpan">女</span></label>
    <br>
    <p>兴趣：</p>
    <label><input type="checkbox" checked="checked" value="1" name="fruit"> <span
            class="checkboxSpan">乒乓球</span></label>
    <label><input type="checkbox" value="2" name="fruit"> <span class="checkboxSpan">羽毛球</span></label>
    <label><input type="checkbox" value="3" name="fruit"> <span class="checkboxSpan">篮球</span></label>
    <br>
    <p>开关：</p>
    <input type="checkbox" class="check">
</form>
</body>
</html>